package com.muyu.danmo.mapper;

import com.muyu.danmo.domain.DanmoPrintingLikes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 印刷出版点赞Mapper接口
 *
 * @author yangle
 * @date 2024-10-15
 */
public interface DanmoPrintingLikesMapper
{
    /**
     * 查询印刷出版点赞
     *
     * @param id 印刷出版点赞主键
     * @return 印刷出版点赞
     */
    public DanmoPrintingLikes selectDanmoPrintingLikesById(Long id);

    /**
     * 查询印刷出版点赞列表
     *
     * @param danmoPrintingLikes 印刷出版点赞
     * @return 印刷出版点赞集合
     */
    public List<DanmoPrintingLikes> selectDanmoPrintingLikesList(DanmoPrintingLikes danmoPrintingLikes);

    /**
     * 新增印刷出版点赞
     *
     * @param danmoPrintingLikes 印刷出版点赞
     * @return 结果
     */
    public int insertDanmoPrintingLikes(DanmoPrintingLikes danmoPrintingLikes);

    /**
     * 修改印刷出版点赞
     *
     * @param danmoPrintingLikes 印刷出版点赞
     * @return 结果
     */
    public int updateDanmoPrintingLikes(DanmoPrintingLikes danmoPrintingLikes);

    /**
     * 删除印刷出版点赞
     *
     * @param id 印刷出版点赞主键
     * @return 结果
     */
    public int deleteDanmoPrintingLikesById(Long id);

    /**
     * 批量删除印刷出版点赞
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDanmoPrintingLikesByIds(Long[] ids);

    boolean existsByUserIdAndPrintingClassId(@Param("userId") Long userId, @Param("printingMessageId") Long printingMessageId);

    void updateAmountPraise(@Param("printingMessageId") Long printingMessageId);

}
